package untils

import (
	"house-src/pkg"
	"log"
)

type SendSms interface {
	AliSendSms(mobile string, code string) error
}

// 阿里云 SMS
type ALiYun struct{}

func (s *ALiYun) AliSendSms(mobile string, code string) error {
	sms, err := pkg.SendSms(mobile, code)
	if err != nil {
		return err
	}
	log.Println(sms)
	return err
}

// 互亿无线 SMS
type HuYi struct{}

func (s *HuYi) HuYiSendSms(mobile string, code string) error {
	sms, err := pkg.SendSms(mobile, code)
	if err != nil {
		return err
	}
	log.Println(sms)
	return err
}

// 短信宝 SMS
type DuanXin struct{}

func (s *DuanXin) DuanXinSendSms(mobile string, code string) error {
	sms, err := pkg.SendSms(mobile, code)
	if err != nil {
		return err
	}
	log.Println(sms)
	return err
}
